package util.AST.Statement;

import java.util.ArrayList;

import checker.SemanticException;
import checker.Visitor;

import util.AST.Expression.Expression;

public class WhileStatement extends Statement{

	private Expression condition;
    private ArrayList<Statement> stmts;
    
    public WhileStatement(Expression condition, ArrayList<Statement> statements) {
            this.condition = condition;
            this.stmts = statements;
    }

    public Expression getCondition() {
            return condition;
    }

    public ArrayList<Statement> getStatements() {
            return stmts;
    }
	
	@Override
	public String toString(int level) {
		// TODO Auto-generated method stub
		return null;
	}
	
	public Object visit(Visitor v, Object o) throws SemanticException {
		// TODO Auto-generated method stub
		return v.visitWhileStatement(this, o);
	}

}
